package com.heima.method;

public class Demo13 {
    public static void main(String[] args) {
        //1.将一个数组静态初始化
        //2.遍历数组
        //3.设计数组打印不换行
        //4.调用函数,输出满足要求的数据
        int[] a=new int[]{1,22,11,33,12,21,23,32};
        println(a);
    }
    public static void println(int[] a){
        System.out.print("["+a[0]);
        for (int i = 1; i <a.length-1 ; i++) {
            System.out.print(a[i]+", ");
        }
        System.out.println(a[a.length-1]+"]");
        //System.out.println();

    }
}
